from threading import Event

e = Event()

print(e.wait(3))

print(e.set())
print(e.wait())